<template>
   <h2>{{ary}}</h2>
   <button @click="change">更新</button>
</template>

<script lang='ts' setup>
   import {ref} from 'vue'
   let ary=ref<Array<string>>(['Giles','Monica','Lucy','Lily'])
   const change=()=>{
     //ary[2]='Marry'
     ary.value=['张资源','刘畅','黎明','小宅']
     console.log('ary',ary);
     
   }
</script>

<style lang='scss' scoped>
</style>